<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <style>
        /* li {
            color: red;
        } */
        /* [id] {
            color: hotpink;
        } */
        /* [class] {
            color: skyblue;
        } */
        /* li[id] {
            color: green;
        } */
        li[id=item1] {
            color: green;
        }
    </style>

    <div id="haha">哈哈哈</div>
    <ul>
        <li id="item1">内容1</li>
        <li class="item">内容2</li>
        <li id="item3">内容3</li>
        <li class="item">内容4</li>
        <li class="test">内容5</li>
    </ul>
</body>
</html>